<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
	<head>
		<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
		<meta charset="utf-8" />
		<title>产后妈咪恢复计划</title>
		<link rel="stylesheet" href="${BASE_PATH}/static/app/css/reset.css" />
		<link rel="stylesheet" type="text/css" href="${BASE_PATH}/static/app/css/header.css"/>	
		<link rel="stylesheet" href="${BASE_PATH}/static/app/css/plan.css" />
		<style>
		.function-title-content i{
		color:#f697b7;
		font-style:normal;
		}
		.warp-price i{
		font-style: normal;
		}
		</style>
	</head>

	<body>
		<div class="header">
			<span class="back" onclick="history.go(-1);"></span>
			<a href="/index"><span class="logo_pic"></span></a>
			<span class="logo_text">OK 妈咪</span>
		</div>
		<div class="title">
			<div class="title-left">
				<img class="user-picture" src="${WX_USER.headimgurl}" />
			    <p>${WX_USER.nickname}</p>
			</div>
			
			<div class="integral">
				<div class="integral-box">
					<div class="integral-content">
						<span>${user.jkpoint }</span>
						<p>健康积分</p>
					</div>
					<div class="integral-content">
						<span>${user.sppoint }</span>
						<p>商品积分</p>
					</div>
					<div class="integral-content">
						<span>${user.jypoint }</span>
						<p>教育积分</p>
					</div>
				</div>
				
			</div>
		</div>
		<div class="function-title">
			<div class="function-title-content">				
				<span>你还有 <i>${i }</i> 个特惠项目可以进行体验哦</span>
			</div>		
		</div>
		<!--菜单列表-->
		<div class="warp warp-first">
				<div class="warp-box" >
					<img src="${BASE_PATH}/static/app/img/201801241724.png" class="icon" onclick="change(1);"/>
					<span onclick="change(1);">孕中可体验项目</span>
					<a href="javascript:" class="arrow" id="arrow1" onclick="change(1);"></a>
					<c:forEach items="${list1 }" var="list">
						<c:if test="${list.orderState!=null && list.orderState!=''}">
					    	<div class="warp-details warp-details1" style="display: none;" vValue="0">
					   	</c:if>
					   	<c:if test="${list.orderState==null || list.orderState==''}">
					    	<div class="warp-details warp-details1" style="display: none;" vValue="0" onclick="detail(${list.id});">
					   	</c:if>
					    	<img src="${FTP_PATH}${list.thumb}" alt="" onerror="src='${BASE_PATH}/static/app/img/model.png';"/>
					    	<div class="warp-details-content">
					    		<p>${list.name}</p>
					    		<div class="warp-price">
						    		<c:choose>
						    			<c:when test="${list.currency>0 }">
								    		<p id="Type${list.id}" name="1">¥${list.currency }</p>
						    			</c:when>
						    			<c:when test="${list.integral>0 ||list.integral==-1}">
						    				<p id="Type${list.id}" name="2">
						    					<c:choose>
						    						<c:when test="${list.integralType==1 }">
						    							商品积分
						    						</c:when>
						    						<c:when test="${list.integralType==2 }">
						    							健康积分
						    						</c:when>
						    						<c:when test="${list.integralType==3 }">
						    							教育积分
						    						</c:when>
						    					</c:choose>
						    					<span>
						    					    <c:if test="${list.integral >0}">								   
															<i> ${list.integral }</i>      			                       	   
													 </c:if>
													 <c:if test="${list.integral==-1}">								   
															<i> 0</i>      			                       	   
													 </c:if>
						    					</span>
						    				</p>
						    			</c:when>
						    			<c:when test="${list.integCur_i!=0 }">
								    		<p id="Type${list.id}" name="3">
								    			<c:choose>
						    						<c:when test="${list.integCur_iType==1 }">
						    							商品积分
						    						</c:when>
						    						<c:when test="${list.integCur_iType==2 }">
						    							健康积分
						    						</c:when>
						    						<c:when test="${list.integCur_iType==3 }">
						    							教育积分
						    						</c:when>
						    					</c:choose>
								    			<span>${list.integCur_i }+¥${list.integCur_c }</span>
								    		</p>
						    			</c:when>
						    		</c:choose>
						    		<p><sj>门市价:¥${list.marketPrice }</sj> <span>已售${list.num }</span></p>
					    	    </div>
					    	</div>
					    	<!--状态-->
					    	    <c:if test="${list.orderState==2 }">
						    	    <i class="warp-details-state1"></i>
					    	    </c:if>
					    	    <c:if test="${list.orderState==1}">
						    	    <i class="warp-details-state"></i>
					    	    </c:if>
					    </div>
					</c:forEach>
				</div>
                <div  class="warp-box">
					<img src="${BASE_PATH}/static/app/img/201805241724-2.png" class="icon" onclick="change(2);"/>
					<span onclick="change(2);">月子期可体验项目</span>
					<a href="javascript:" class="arrow" id="arrow2" onclick="change(2);"></a>
					<c:forEach items="${list2 }" var="list">
						<c:if test="${list.orderState!=null && list.orderState!=''}">
					    	<div class="warp-details warp-details2" style="display: none;" vValue="0">
					   	</c:if>
					   	<c:if test="${list.orderState==null || list.orderState==''}">
					    	<div class="warp-details warp-details2" style="display: none;" vValue="0" onclick="detail(${list.id});">
					   	</c:if>
					    	<img src="${FTP_PATH}${list.thumb}" alt="" onerror="src='${BASE_PATH}/static/app/img/model.png';"/>
					    	<div class="warp-details-content">
					    		<p>${list.name}</p>
					    		<div class="warp-price">
						    		<c:choose>
						    			<c:when test="${list.currency>0 }">
								    		<p id="Type${list.id}" name="1">¥${list.currency }</p>
						    			</c:when>
						    			<c:when test="${list.integral>0 ||list.integral==-1}">
						    				<p id="Type${list.id}" name="2">
						    					<c:choose>
						    						<c:when test="${list.integralType==1 }">
						    							商品积分
						    						</c:when>
						    						<c:when test="${list.integralType==2 }">
						    							健康积分
						    						</c:when>
						    						<c:when test="${list.integralType==3 }">
						    							教育积分
						    						</c:when>
						    					</c:choose>
						    					<span>
						    					    <c:if test="${list.integral >0}">								   
															<i> ${list.integral }</i>      			                       	   
													 </c:if>
													 <c:if test="${list.integral==-1}">								   
															<i>  0</i>      			                       	   
													 </c:if>
						    					</span>
						    				</p>
						    			</c:when>
						    			<c:when test="${list.integCur_i!=0 }">
								    		<p id="Type${list.id}" name="3">
								    			<c:choose>
						    						<c:when test="${list.integCur_iType==1 }">
						    							商品积分
						    						</c:when>
						    						<c:when test="${list.integCur_iType==2 }">
						    							健康积分
						    						</c:when>
						    						<c:when test="${list.integCur_iType==3 }">
						    							教育积分
						    						</c:when>
						    					</c:choose>
								    			<span>${list.integCur_i }+¥${list.integCur_c }</span>
								    		</p>
						    			</c:when>
						    		</c:choose>
						    		<p><sj>门市价:¥${list.marketPrice }</sj> <span>已售${list.num }</span></p>
						    	  </div>  
					    	</div>
					    	<!--状态-->
					    	    <c:if test="${list.orderState==2 }">
						    	    <i class="warp-details-state1"></i>
					    	    </c:if>
					    	    <c:if test="${list.orderState==1}">
						    	    <i class="warp-details-state"></i>
					    	    </c:if>
					    </div>
					</c:forEach>
				</div>
				<div  class="warp-box">
					<img src="${BASE_PATH}/static/app/img/201805241724-3.png" class="icon" onclick="change(3);"/>
					<span onclick="change(3);">满月后可体验项目</span>
					<a href="javascript:" class="arrow" id="arrow3" onclick="change(3);"></a>
					<c:forEach items="${list3 }" var="list">
						<c:if test="${list.orderState!=null && list.orderState!=''}">
					    	<div class="warp-details warp-details3" vValue="0" style="display: none;">
					   	</c:if>
					   	<c:if test="${list.orderState==null || list.orderState==''}">
					    	<div class="warp-details warp-details3" vValue="0" style="display: none;" onclick="detail(${list.id});">
					   	</c:if>
					    	<img src="${FTP_PATH}${list.thumb}" alt="" onerror="src='${BASE_PATH}/static/app/img/model.png';"/>
					    	<div class="warp-details-content">
					    		<p>${list.name}</p>
					    		<div class="warp-price">
						    		<c:choose>
						    			<c:when test="${list.currency>0 }">
								    		<p id="Type${list.id}" name="1">¥${list.currency }</p>
						    			</c:when>
						    			<c:when test="${list.integral>0 ||list.integral==-1}">
						    				<p id="Type${list.id}" name="2">
						    					<c:choose>
						    						<c:when test="${list.integralType==1 }">
						    							商品积分
						    						</c:when>
						    						<c:when test="${list.integralType==2 }">
						    							健康积分
						    						</c:when>
						    						<c:when test="${list.integralType==3 }">
						    							教育积分
						    						</c:when>
						    					</c:choose>
						    					<span>
						    					    <c:if test="${list.integral >0}">								   
															<i> ${list.integral }</i>      			                       	   
													 </c:if>
													 <c:if test="${list.integral==-1}">								   
															<i>  0</i>      			                       	   
													 </c:if>
						    					</span>

						    				</p>
						    			</c:when>
						    			<c:when test="${list.integCur_i!=0 }">
								    		<p id="Type${list.id}" name="3">
								    			<c:choose>
						    						<c:when test="${list.integCur_iType==1 }">
						    							商品积分
						    						</c:when>
						    						<c:when test="${list.integCur_iType==2 }">
						    							健康积分
						    						</c:when>
						    						<c:when test="${list.integCur_iType==3 }">
						    							教育积分
						    						</c:when>
						    					</c:choose>
								    			<span>${list.integCur_i }+¥${list.integCur_c }</span>
								    		</p>
						    			</c:when>
						    		</c:choose>
						    		<p><sj>门市价:¥${list.marketPrice }</sj> <span>已售${list.num }</span></p>
					    	    </div>
					    	</div>
					    	<!--状态-->
					    	    <c:if test="${list.orderState==2 }">
						    	    <i class="warp-details-state1"></i>
					    	    </c:if>
					    	    <c:if test="${list.orderState==1}">
						    	    <i class="warp-details-state"></i>
					    	    </c:if>
					    </div>
					</c:forEach>
				</div>
		</div>
		<script type="text/javascript" src="${BASE_PATH}/static/lib/jquery/jquery-1.11.2.min.js"></script>
		<!-- amazeui -->
		<script type="text/javascript" src="${BASE_PATH}/static/ui/js/amazeui.min.js"></script>
		<!-- lib -->
		<script type="text/javascript" src="${BASE_PATH}/static/lib/swiper/js/swiper.jquery.min.js"></script>
		<script type="text/javascript" src="${BASE_PATH}/static/lib/layer/layer.js"></script>
		<script type="text/javascript" src="${BASE_PATH}/static/lib/template/template.js"></script>
		<script type="text/javascript" src="${BASE_PATH}/static/lib/jquery-lazyload/jquery.lazyload.min.js"></script>
		<script type="text/javascript" src="${BASE_PATH}/static/lib/jquery-marquee/jquery.marquee.min.js"></script>
		<!-- app -->
		<script type="text/javascript" src="${BASE_PATH}/static/app/js/kit.js"></script>
		<script src="${BASE_PATH}/static/app/js/swiper-3.4.0.min.js" type="text/javascript" charset="utf-8"></script>

<script type="text/javascript">
//跳转到商品详情
function detail(id){
	var Type = document.querySelector("#Type"+id);
	var type = Type.getAttribute("name");
	window.location.href="${BASE_PATH}/goods/jfdetail/"+id+"?type="+type;
};
//控制折叠面板
function change(type){
	var obj=document.querySelectorAll(".arrow");	  			
	var vValue = $(".warp-details"+type).attr("vValue");	
	if(vValue==0){
		$(".warp-details"+type).show();
		$(".warp-details"+type).attr("vValue","1");			
	}else{
		$(".warp-details"+type).hide();
		$(".warp-details"+type).attr("vValue","0");
    } 
	if(obj[type-1].className=="arrow"){
		obj[type-1].className="arrow arrow2";
	}else{
		obj[type-1].className="arrow";
	}
};

</script>
</body>
</html>